package com.bailian.spring.ioc.sigleton_lifecycle;

import com.bailian.spring.ioc.sigleton_lifecycle.config.SpringLifeCycleConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author gaoxu
 * date: Created on 2021/11/1 下午2:53
 */
public class SpringBeanLifeCycleApplication {

    public static void main(String[] args) {
        System.out.println("准备初始化IOC容器..");
        AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SpringLifeCycleConfig.class);
        System.out.println("IOC容器初始化完成..");

//        Dog dog = ctx.getBean(Dog.class);
//        System.out.println(dog);
//        System.out.println("=================");
//
//        System.out.println("准备销毁IOC容器。。。");
//        ctx.close();
//        System.out.println("IOC容器销毁完成。。。");
    }
}
